Added doccomment.
authoremellor@ewan <emellor@ewan>
Tue, 11 Oct 2005 09:30:13 +0000 (10:30 +0100)
committeremellor@ewan <emellor@ewan>
Tue, 11 Oct 2005 09:30:13 +0000 (10:30 +0100)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/util/asserts.py

index 78f4c1b4a88b857ec50856802f57876e483e1a1a..dd3cb7f85226d5025eaeb995e3ad1f27b6850936 100644 (file)
 
 
 def isCharConvertible(c):
+    """Assert that the given value is convertible to a character using the %c
+    conversion.  This implies that c is either an integer, or a character
+    (i.e. a string of length 1).
+    """
+    
     assert (isinstance(c, int) or
             (isinstance(c, str) and
              len(c) == 1)), "%s is not convertible to a character" % c